import * as actionTypes from './constants'

const initialState = {
  banners: [],
  recommends: []
}


function reducer (state = initialState, action) {
  switch (action.type) {
    case actionTypes.ADDBANNER:
      return { ...state, banners: action.banner }
    case actionTypes.ADDPRODUCTLIST:
      return { ...state, recommends: action.productList }
    default:
      return state;
  }
}

export default reducer
